package com.zenghus.jdbccore.impl;

import java.util.List;

import com.zenghus.jdbccore.BaseDao;
import com.zenghus.jdbccore.BaseService;


public abstract class BaseServiceImpl implements BaseService {
	
	public abstract BaseDao getDao();

	
	public <T> void add(T t)  throws Exception{
	    getDao().add(t);
	}
	
	public <T> void update(T t)  throws Exception{
		getDao().update(t);
	}
	
	public <T> void delete(Object... ids) throws Exception{
		getDao().delete(ids);
	}
	
	public <T> List<T> queryByList(T obj) throws Exception{
		return getDao().queryByList(obj);
	}

	public <T> T queryById(Object id) throws Exception{
		return getDao().queryById(id);
	}
}
